package com.wondersgroup.fjzlpt.org.service.impl.qytj;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.wondersgroup.fjzlpt.org.dao.inter.Qytj.QytjDAO;
import com.wondersgroup.fjzlpt.org.service.inter.qytj.QytjService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 签约统计服务层
 * <p>
 * <p>
 * Created by sanma on 2017/10/11.
 */
@Service
public class QytjServiceImpl implements QytjService{

    @Autowired
    private QytjDAO qytjDAO;

    @Override
    public JSONObject queryTjxxPage(Map map) {
        return qytjDAO.queryTjxxPage(map);
    }

    @Override
    public JSONArray queryQysjxx(Map map) {
        String action = map.remove("TYPE").toString();
        if(action.equals("ZJ")){
            return qytjDAO.queryQyZjsjxx(map);
        }else if(action.equals("BG")){
            return qytjDAO.queryQyBgsjxx(map);
        }else{
            return qytjDAO.queryQysjxx(map);
        }
    }
}
